package com.example.demo.dao.report;

import com.example.demo.po.report.Report;
import com.example.demo.po.report.SimilarReport;
import com.example.demo.vo.report.ReportVO;
import com.example.demo.vo.report.SimilarReportVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ReportDao {
    Integer insertReport(ReportVO reportVO);

    Integer selectReportByUserAndTask(@Param("uid")int uid,@Param("tid") int tid);

    List<SimilarReport> selectReportWithSimilarity(@Param("tid") int tid,@Param("uid") int uid, @Param("pageNumKey") int pageNum,
                                                   @Param("pageSizeKey") int pageSize);

    Integer updateAvgScore(@Param("rid") int rid, @Param("score") int score, @Param("active") double active);

    Integer selectRecentReportNumByUser(String username);

    ReportVO selectReportByRid(@Param("rid") int rid);


}
